docs: document group-sync mapping API filter and patch-by-project-key - #485
docs: document group-sync mapping API filter and patch-by-project-key#485pablohashescobar wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe group-sync documentation now describes APIs for listing and updating project role mappings, including authentication, filtering, matching rules, supported fields, validation, and error responses. ChangesProject role mapping API
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Linked to Plane Work Item(s) References This comment was auto-generated by Plane |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/authentication/group-sync.md`:
- Around line 149-153: Update the group-sync PATCH example documentation to
state that both path parameters must be percent-encoded, and illustrate an
encoded IdP group name such as Platform%20Engineering. Preserve the explanation
that both the project identifier and group name identify the mapping.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aac3140b-3fd0-48f6-8a4a-522588eeb7e9
📒 Files selected for processing (1)
docs/authentication/group-sync.md
| ```bash | ||
| curl -X PATCH "https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/ENG/eng-team/" \ | ||
| -H "x-api-key: $PLANE_API_KEY" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"role": "admin"}' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Document URL encoding for path parameters.
Line 150 places idp_group_name directly in the URL path. IdP group names can contain spaces or reserved characters. URI path segments use / as separators, and reserved characters require percent-encoding. (rfc-editor.org)
Add encoding guidance and an example such as Platform%20Engineering.
Proposed documentation change
curl -X PATCH "https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/ENG/eng-team/" \
-H "x-api-key: $PLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"role": "admin"}'+Percent-encode both path parameters. For example, use Platform%20Engineering for Platform Engineering.
+
A project can have one mapping per IdP group, so both the project identifier and the group name are needed to identify a single mapping.
</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/authentication/group-sync.md` around lines 149 - 153, Update the
group-sync PATCH example documentation to state that both path parameters must
be percent-encoded, and illustrate an encoded IdP group name such as
Platform%20Engineering. Preserve the explanation that both the project
identifier and group name identify the mapping.
Description
Documents the group-sync external API capabilities added in makeplane/plane-ee#8476 (WEB-8354) on the IdP Group Sync page.
Adds a Manage project mappings with the API section covering:
project_identifierquery parameter onGET /api/v1/workspaces/:slug/group-sync/project-mappings/(case-insensitive, empty list on no match).PATCH /api/v1/workspaces/:slug/group-sync/project-mappings/:project_key/:idp_group_name/, including the writable fields (idp_group_name,project,all_projects,role) and404behavior.400response for empty PATCH bodies on all group-mapping endpoints.Behavior was verified against the merged plane-ee implementation before writing.
🤖 Generated with Claude Code
Summary by CodeRabbit